<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>

    </style>
</head>
<body>
<style>
    .docker{
        width:800px;
        margin:100px auto;
    }
    table{
        width:800px;
    }
    td{
        text-align:center;
    }
</style>
</body>
<table border="1">
    <caption>学生信息</caption>
    <div class="docker">
        <div class="add">
            <a href="{{url_for('stu.add_stu') }}">新增</a>
        </div>
    </div>
    <tr>
        <th>学号</th>
        <th>姓名</th>
        <th>年龄</th>
        <th>性别</th>
        <th>地址</th>
        <th>操作</th>
    </tr>
    {% for s in students_info %}
    <tr>
        <td>{{s.sno}}</td>
        <td>{{s.name}}</td>
        <td>{{s.age}}</td>
        <td>{{ s.gender }}</td>
        <td>{{ '无' if not s['address'] else s['address'] }}</td>
        <td>
            <a href="{{url_for('stu.update_stu',s_id=s.sno)}}">修改</a>
            <a href="/stu/del/{{s.sno}}">删除</a>
        </td>
    </tr>
    {%endfor%}
</table>

</html>